<template>
    <p>{{ calculateBooksMessage() }}</p>
</template>

<script setup lang='ts'>
import { reactive } from 'vue';

const author = reactive({
    name: 'John Doe',
    books: [
        'Vue 2 - Advanced Guide',
        'Vue 3 - Basic Guide',
        'Vue 4 - The Mystery'
    ]
})

function calculateBooksMessage() {
    return author.books.length > 0 ? 'Yes' : 'No'
}
</script>

<style></style>